<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span class="hs-cpp">
#if __GLASGOW_HASKELL__ &gt;= 702
</span><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">#if __GLASGOW_HASKELL__ &gt;= 710
</span><span class="hs-pragma">{-# LANGUAGE AutoDeriveTypeable #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Module      :  Control.Monad.Trans.Except</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Copyright   :  (C) 2013 Ross Paterson</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- License     :  BSD-style (see the file LICENSE)</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Maintainer  :  R.Paterson@city.ac.uk</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-17"></span><span class="hs-comment">--</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- This monad transformer extends a monad with the ability to throw exceptions.</span><span>
</span><span id="line-19"></span><span class="hs-comment">--</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- A sequence of actions terminates normally, producing a value,</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- only if none of the actions in the sequence throws an exception.</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- If one throws an exception, the rest of the sequence is skipped and</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- the composite action exits with that exception.</span><span>
</span><span id="line-24"></span><span class="hs-comment">--</span><span>
</span><span id="line-25"></span><span class="hs-comment">-- If the value of the exception is not required, the variant in</span><span>
</span><span id="line-26"></span><span class="hs-comment">-- &quot;Control.Monad.Trans.Maybe&quot; may be used instead.</span><span>
</span><span id="line-27"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Control.Monad.Trans.Except</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-30"></span><span>    </span><span class="annot"><span class="hs-comment">-- * The Except monad</span></span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#Except"><span class="hs-identifier">Except</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#except"><span class="hs-identifier">except</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#runExcept"><span class="hs-identifier">runExcept</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#mapExcept"><span class="hs-identifier">mapExcept</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#withExcept"><span class="hs-identifier">withExcept</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><span class="hs-comment">-- * The ExceptT monad transformer</span></span><span>
</span><span id="line-37"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier">ExceptT</span></a></span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier">ExceptT</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier">runExceptT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#mapExceptT"><span class="hs-identifier">mapExceptT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#withExceptT"><span class="hs-identifier">withExceptT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Exception operations</span></span><span>
</span><span id="line-42"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#throwE"><span class="hs-identifier">throwE</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#catchE"><span class="hs-identifier">catchE</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Lifting other operations</span></span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#liftCallCC"><span class="hs-identifier">liftCallCC</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#liftListen"><span class="hs-identifier">liftListen</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#liftPass"><span class="hs-identifier">liftPass</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#"><span class="hs-identifier">Control.Monad.IO.Class</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html"><span class="hs-identifier">Control.Monad.Signatures</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Class.html"><span class="hs-identifier">Control.Monad.Trans.Class</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#"><span class="hs-identifier">Data.Functor.Classes</span></a></span><span class="hs-cpp">
#if MIN_VERSION_base(4,12,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#"><span class="hs-identifier">Data.Functor.Contravariant</span></a></span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Identity.html#"><span class="hs-identifier">Data.Functor.Identity</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Applicative.html#"><span class="hs-identifier">Control.Applicative</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#"><span class="hs-identifier">Control.Monad.Fail</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Fail</span></span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#"><span class="hs-identifier">Control.Monad.Fix</span></a></span><span class="hs-cpp">
#if MIN_VERSION_base(4,4,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#"><span class="hs-identifier">Control.Monad.Zip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#MonadZip"><span class="hs-identifier">MonadZip</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#mzipWith"><span class="hs-identifier">mzipWith</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#"><span class="hs-identifier">Data.Foldable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier">Foldable</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier">foldMap</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Monoid.html#"><span class="hs-identifier">Data.Monoid</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#"><span class="hs-identifier">Data.Traversable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier">Traversable</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier">traverse</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-comment">-- | The parameterizable exception monad.</span><span>
</span><span id="line-73"></span><span class="hs-comment">--</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- Computations are either exceptions or normal values.</span><span>
</span><span id="line-75"></span><span class="hs-comment">--</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- The 'return' function returns a normal value, while @&gt;&gt;=@ exits on</span><span>
</span><span id="line-77"></span><span class="hs-comment">-- the first exception.  For a variant that continues after an error</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- and collects all the errors, see 'Control.Applicative.Lift.Errors'.</span><span>
</span><span id="line-79"></span><span class="hs-keyword">type</span><span> </span><span id="Except"><span class="annot"><a href="Control.Monad.Trans.Except.html#Except"><span class="hs-identifier hs-var">Except</span></a></span></span><span> </span><span id="local-6989586621679074753"><span class="annot"><a href="#local-6989586621679074753"><span class="hs-identifier hs-type">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074753"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Identity.html#Identity"><span class="hs-identifier hs-type">Identity</span></a></span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span class="hs-comment">-- | Constructor for computations in the exception monad.</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- (The inverse of 'runExcept').</span><span>
</span><span id="line-83"></span><span id="local-6989586621679075222"><span id="local-6989586621679075223"><span id="local-6989586621679075224"><span class="annot"><a href="Control.Monad.Trans.Except.html#except"><span class="hs-identifier hs-type">except</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075224"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075223"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075222"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075223"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075224"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075222"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-84"></span><span id="except"><span class="annot"><span class="annottext">except :: forall (m :: * -&gt; *) e a. Monad m =&gt; Either e a -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#except"><span class="hs-identifier hs-var hs-var">except</span></a></span></span><span> </span><span id="local-6989586621679074750"><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074750"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Either e a -&gt; m (Either e a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074750"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-85"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#except"><span class="hs-pragma hs-type">except</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-comment">-- | Extractor for computations in the exception monad.</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- (The inverse of 'except').</span><span>
</span><span id="line-89"></span><span id="local-6989586621679075212"><span id="local-6989586621679075213"><span class="annot"><a href="Control.Monad.Trans.Except.html#runExcept"><span class="hs-identifier hs-type">runExcept</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#Except"><span class="hs-identifier hs-type">Except</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075213"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075212"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075213"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075212"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-90"></span><span id="runExcept"><span class="annot"><span class="annottext">runExcept :: forall e a. Except e a -&gt; Either e a
</span><a href="Control.Monad.Trans.Except.html#runExcept"><span class="hs-identifier hs-var hs-var">runExcept</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074749"><span class="annot"><span class="annottext">Identity (Either e a)
</span><a href="#local-6989586621679074749"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Identity (Either e a) -&gt; Either e a
forall a. Identity a -&gt; a
</span><a href="../../base/src/Data.Functor.Identity.html#runIdentity"><span class="hs-identifier hs-var hs-var">runIdentity</span></a></span><span> </span><span class="annot"><span class="annottext">Identity (Either e a)
</span><a href="#local-6989586621679074749"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-91"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#runExcept"><span class="hs-pragma hs-type">runExcept</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-comment">-- | Map the unwrapped computation using the given function.</span><span>
</span><span id="line-94"></span><span class="hs-comment">--</span><span>
</span><span id="line-95"></span><span class="hs-comment">-- * @'runExcept' ('mapExcept' f m) = f ('runExcept' m)@</span><span>
</span><span id="line-96"></span><span id="local-6989586621679075203"><span id="local-6989586621679075204"><span id="local-6989586621679075205"><span id="local-6989586621679075206"><span class="annot"><a href="Control.Monad.Trans.Except.html#mapExcept"><span class="hs-identifier hs-type">mapExcept</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075206"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075205"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075204"><span class="hs-identifier hs-type">e'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075203"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-97"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#Except"><span class="hs-identifier hs-type">Except</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075206"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075205"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-98"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#Except"><span class="hs-identifier hs-type">Except</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075204"><span class="hs-identifier hs-type">e'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075203"><span class="hs-identifier hs-type">b</span></a></span></span></span></span></span><span>
</span><span id="line-99"></span><span id="mapExcept"><span class="annot"><span class="annottext">mapExcept :: forall e a e' b.
(Either e a -&gt; Either e' b) -&gt; Except e a -&gt; Except e' b
</span><a href="Control.Monad.Trans.Except.html#mapExcept"><span class="hs-identifier hs-var hs-var">mapExcept</span></a></span></span><span> </span><span id="local-6989586621679074747"><span class="annot"><span class="annottext">Either e a -&gt; Either e' b
</span><a href="#local-6989586621679074747"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Identity (Either e a) -&gt; Identity (Either e' b))
-&gt; ExceptT e Identity a -&gt; ExceptT e' Identity b
forall (m :: * -&gt; *) e a (n :: * -&gt; *) e' b.
(m (Either e a) -&gt; n (Either e' b))
-&gt; ExceptT e m a -&gt; ExceptT e' n b
</span><a href="Control.Monad.Trans.Except.html#mapExceptT"><span class="hs-identifier hs-var">mapExceptT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Either e' b -&gt; Identity (Either e' b)
forall a. a -&gt; Identity a
</span><a href="../../base/src/Data.Functor.Identity.html#Identity"><span class="hs-identifier hs-var">Identity</span></a></span><span> </span><span class="annot"><span class="annottext">(Either e' b -&gt; Identity (Either e' b))
-&gt; (Identity (Either e a) -&gt; Either e' b)
-&gt; Identity (Either e a)
-&gt; Identity (Either e' b)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Either e a -&gt; Either e' b
</span><a href="#local-6989586621679074747"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(Either e a -&gt; Either e' b)
-&gt; (Identity (Either e a) -&gt; Either e a)
-&gt; Identity (Either e a)
-&gt; Either e' b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Identity (Either e a) -&gt; Either e a
forall a. Identity a -&gt; a
</span><a href="../../base/src/Data.Functor.Identity.html#runIdentity"><span class="hs-identifier hs-var hs-var">runIdentity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-100"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#mapExcept"><span class="hs-pragma hs-type">mapExcept</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="hs-comment">-- | Transform any exceptions thrown by the computation using the given</span><span>
</span><span id="line-103"></span><span class="hs-comment">-- function (a specialization of 'withExceptT').</span><span>
</span><span id="line-104"></span><span id="local-6989586621679075186"><span id="local-6989586621679075187"><span id="local-6989586621679075188"><span class="annot"><a href="Control.Monad.Trans.Except.html#withExcept"><span class="hs-identifier hs-type">withExcept</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679075188"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679075187"><span class="hs-identifier hs-type">e'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#Except"><span class="hs-identifier hs-type">Except</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075188"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075186"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#Except"><span class="hs-identifier hs-type">Except</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075187"><span class="hs-identifier hs-type">e'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075186"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-105"></span><span id="withExcept"><span class="annot"><span class="annottext">withExcept :: forall e e' a. (e -&gt; e') -&gt; Except e a -&gt; Except e' a
</span><a href="Control.Monad.Trans.Except.html#withExcept"><span class="hs-identifier hs-var hs-var">withExcept</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(e -&gt; e') -&gt; ExceptT e Identity a -&gt; ExceptT e' Identity a
forall (m :: * -&gt; *) e e' a.
Functor m =&gt;
(e -&gt; e') -&gt; ExceptT e m a -&gt; ExceptT e' m a
</span><a href="Control.Monad.Trans.Except.html#withExceptT"><span class="hs-identifier hs-var">withExceptT</span></a></span><span>
</span><span id="line-106"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#withExcept"><span class="hs-pragma hs-type">withExcept</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-- | A monad transformer that adds exceptions to other monads.</span><span>
</span><span id="line-109"></span><span class="hs-comment">--</span><span>
</span><span id="line-110"></span><span class="hs-comment">-- @ExceptT@ constructs a monad parameterized over two things:</span><span>
</span><span id="line-111"></span><span class="hs-comment">--</span><span>
</span><span id="line-112"></span><span class="hs-comment">-- * e - The exception type.</span><span>
</span><span id="line-113"></span><span class="hs-comment">--</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- * m - The inner monad.</span><span>
</span><span id="line-115"></span><span class="hs-comment">--</span><span>
</span><span id="line-116"></span><span class="hs-comment">-- The 'return' function yields a computation that produces the given</span><span>
</span><span id="line-117"></span><span class="hs-comment">-- value, while @&gt;&gt;=@ sequences two subcomputations, exiting on the</span><span>
</span><span id="line-118"></span><span class="hs-comment">-- first exception.</span><span>
</span><span id="line-119"></span><span class="hs-keyword">newtype</span><span> </span><span id="ExceptT"><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span></span><span> </span><span id="local-6989586621679075217"><span class="annot"><a href="#local-6989586621679075217"><span class="hs-identifier hs-type">e</span></a></span></span><span> </span><span id="local-6989586621679075218"><span class="annot"><a href="#local-6989586621679075218"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621679075216"><span class="annot"><a href="#local-6989586621679075216"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ExceptT"><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679075218"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075217"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075216"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span id="local-6989586621679075172"><span id="local-6989586621679075173"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679075173"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075172"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075173"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075172"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-122"></span><span>    </span><span id="local-6989586621679074734"><span class="annot"><span class="annottext">liftEq :: forall a b.
(a -&gt; b -&gt; Bool) -&gt; ExceptT e m a -&gt; ExceptT e m b -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftEq</span></a></span></span><span> </span><span id="local-6989586621679074732"><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><a href="#local-6989586621679074732"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074731"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074731"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074730"><span class="annot"><span class="annottext">m (Either e b)
</span><a href="#local-6989586621679074730"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Either e a -&gt; Either e b -&gt; Bool)
-&gt; m (Either e a) -&gt; m (Either e b) -&gt; Bool
forall (f :: * -&gt; *) a b.
Eq1 f =&gt;
(a -&gt; b -&gt; Bool) -&gt; f a -&gt; f b -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var">liftEq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; Bool) -&gt; Either e a -&gt; Either e b -&gt; Bool
forall (f :: * -&gt; *) a b.
Eq1 f =&gt;
(a -&gt; b -&gt; Bool) -&gt; f a -&gt; f b -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var">liftEq</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><a href="#local-6989586621679074732"><span class="hs-identifier hs-var">eq</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074731"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either e b)
</span><a href="#local-6989586621679074730"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-123"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#liftEq"><span class="hs-pragma hs-type">liftEq</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span id="local-6989586621679075161"><span id="local-6989586621679075162"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621679075162"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075161"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075162"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075161"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-126"></span><span>    </span><span id="local-6989586621679074717"><span class="annot"><span class="annottext">liftCompare :: forall a b.
(a -&gt; b -&gt; Ordering) -&gt; ExceptT e m a -&gt; ExceptT e m b -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftCompare</span></a></span></span><span> </span><span id="local-6989586621679074715"><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><a href="#local-6989586621679074715"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074714"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074714"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074713"><span class="annot"><span class="annottext">m (Either e b)
</span><a href="#local-6989586621679074713"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-127"></span><span>        </span><span class="annot"><span class="annottext">(Either e a -&gt; Either e b -&gt; Ordering)
-&gt; m (Either e a) -&gt; m (Either e b) -&gt; Ordering
forall (f :: * -&gt; *) a b.
Ord1 f =&gt;
(a -&gt; b -&gt; Ordering) -&gt; f a -&gt; f b -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var">liftCompare</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; Ordering) -&gt; Either e a -&gt; Either e b -&gt; Ordering
forall (f :: * -&gt; *) a b.
Ord1 f =&gt;
(a -&gt; b -&gt; Ordering) -&gt; f a -&gt; f b -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var">liftCompare</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><a href="#local-6989586621679074715"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074714"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either e b)
</span><a href="#local-6989586621679074713"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-128"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#liftCompare"><span class="hs-pragma hs-type">liftCompare</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span id="local-6989586621679075149"><span id="local-6989586621679075150"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074706"><span id="local-6989586621679074708"><span id="local-6989586621679074710"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075150"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075149"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075150"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075149"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-131"></span><span>    </span><span id="local-6989586621679074703"><span class="annot"><span class="annottext">liftReadsPrec :: forall a.
(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; Int -&gt; ReadS (ExceptT e m a)
</span><a href="../../base/src/Data.Functor.Classes.html#liftReadsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftReadsPrec</span></a></span></span><span> </span><span id="local-6989586621679074701"><span class="annot"><span class="annottext">Int -&gt; ReadS a
</span><a href="#local-6989586621679074701"><span class="hs-identifier hs-var">rp</span></a></span></span><span> </span><span id="local-6989586621679074700"><span class="annot"><span class="annottext">ReadS [a]
</span><a href="#local-6989586621679074700"><span class="hs-identifier hs-var">rl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; ReadS (ExceptT e m a)) -&gt; Int -&gt; ReadS (ExceptT e m a)
forall a. (String -&gt; ReadS a) -&gt; Int -&gt; ReadS a
</span><a href="../../base/src/Data.Functor.Classes.html#readsData"><span class="hs-identifier hs-var">readsData</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; ReadS (ExceptT e m a)) -&gt; Int -&gt; ReadS (ExceptT e m a))
-&gt; (String -&gt; ReadS (ExceptT e m a))
-&gt; Int
-&gt; ReadS (ExceptT e m a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-132"></span><span>        </span><span class="annot"><span class="annottext">(Int -&gt; ReadS (m (Either e a)))
-&gt; String
-&gt; (m (Either e a) -&gt; ExceptT e m a)
-&gt; String
-&gt; ReadS (ExceptT e m a)
forall a t.
(Int -&gt; ReadS a) -&gt; String -&gt; (a -&gt; t) -&gt; String -&gt; ReadS t
</span><a href="../../base/src/Data.Functor.Classes.html#readsUnaryWith"><span class="hs-identifier hs-var">readsUnaryWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; ReadS (Either e a))
-&gt; ReadS [Either e a] -&gt; Int -&gt; ReadS (m (Either e a))
forall (f :: * -&gt; *) a.
Read1 f =&gt;
(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; Int -&gt; ReadS (f a)
</span><a href="../../base/src/Data.Functor.Classes.html#liftReadsPrec"><span class="hs-identifier hs-var">liftReadsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS (Either e a)
</span><a href="#local-6989586621679074697"><span class="hs-identifier hs-var">rp'</span></a></span><span> </span><span class="annot"><span class="annottext">ReadS [Either e a]
</span><a href="#local-6989586621679074696"><span class="hs-identifier hs-var">rl'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ExceptT&quot;</span></span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span>
</span><span id="line-133"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-134"></span><span>        </span><span id="local-6989586621679074697"><span class="annot"><span class="annottext">rp' :: Int -&gt; ReadS (Either e a)
</span><a href="#local-6989586621679074697"><span class="hs-identifier hs-var hs-var">rp'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; Int -&gt; ReadS (Either e a)
forall (f :: * -&gt; *) a.
Read1 f =&gt;
(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; Int -&gt; ReadS (f a)
</span><a href="../../base/src/Data.Functor.Classes.html#liftReadsPrec"><span class="hs-identifier hs-var">liftReadsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS a
</span><a href="#local-6989586621679074701"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">ReadS [a]
</span><a href="#local-6989586621679074700"><span class="hs-identifier hs-var">rl</span></a></span><span>
</span><span id="line-135"></span><span>        </span><span id="local-6989586621679074696"><span class="annot"><span class="annottext">rl' :: ReadS [Either e a]
</span><a href="#local-6989586621679074696"><span class="hs-identifier hs-var hs-var">rl'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; ReadS [Either e a]
forall (f :: * -&gt; *) a.
Read1 f =&gt;
(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; ReadS [f a]
</span><a href="../../base/src/Data.Functor.Classes.html#liftReadList"><span class="hs-identifier hs-var">liftReadList</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS a
</span><a href="#local-6989586621679074701"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">ReadS [a]
</span><a href="#local-6989586621679074700"><span class="hs-identifier hs-var">rl</span></a></span></span></span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span id="local-6989586621679075135"><span id="local-6989586621679075136"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074689"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075136"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075135"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075136"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075135"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-138"></span><span>    </span><span id="local-6989586621679074686"><span class="annot"><span class="annottext">liftShowsPrec :: forall a.
(Int -&gt; a -&gt; ShowS)
-&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; ExceptT e m a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftShowsPrec</span></a></span></span><span> </span><span id="local-6989586621679074684"><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679074684"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span id="local-6989586621679074683"><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679074683"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621679074682"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074682"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074681"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074681"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-139"></span><span>        </span><span class="annot"><span class="annottext">(Int -&gt; m (Either e a) -&gt; ShowS)
-&gt; String -&gt; Int -&gt; m (Either e a) -&gt; ShowS
forall a. (Int -&gt; a -&gt; ShowS) -&gt; String -&gt; Int -&gt; a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#showsUnaryWith"><span class="hs-identifier hs-var">showsUnaryWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; Either e a -&gt; ShowS)
-&gt; ([Either e a] -&gt; ShowS) -&gt; Int -&gt; m (Either e a) -&gt; ShowS
forall (f :: * -&gt; *) a.
Show1 f =&gt;
(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; f a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var">liftShowsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Either e a -&gt; ShowS
</span><a href="#local-6989586621679074679"><span class="hs-identifier hs-var">sp'</span></a></span><span> </span><span class="annot"><span class="annottext">[Either e a] -&gt; ShowS
</span><a href="#local-6989586621679074678"><span class="hs-identifier hs-var">sl'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ExceptT&quot;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679074682"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074681"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-140"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-141"></span><span>        </span><span id="local-6989586621679074679"><span class="annot"><span class="annottext">sp' :: Int -&gt; Either e a -&gt; ShowS
</span><a href="#local-6989586621679074679"><span class="hs-identifier hs-var hs-var">sp'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; Either e a -&gt; ShowS
forall (f :: * -&gt; *) a.
Show1 f =&gt;
(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; f a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var">liftShowsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679074684"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679074683"><span class="hs-identifier hs-var">sl</span></a></span><span>
</span><span id="line-142"></span><span>        </span><span id="local-6989586621679074678"><span class="annot"><span class="annottext">sl' :: [Either e a] -&gt; ShowS
</span><a href="#local-6989586621679074678"><span class="hs-identifier hs-var hs-var">sl'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; [Either e a] -&gt; ShowS
forall (f :: * -&gt; *) a.
Show1 f =&gt;
(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; [f a] -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#liftShowList"><span class="hs-identifier hs-var">liftShowList</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679074684"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679074683"><span class="hs-identifier hs-var">sl</span></a></span></span></span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span id="local-6989586621679075128"><span id="local-6989586621679075129"><span id="local-6989586621679075130"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074671"><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679075130"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075129"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679075128"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075130"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075129"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075128"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-145"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679074667"><span class="annot"><span class="annottext">== :: ExceptT e m a -&gt; ExceptT e m a -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">(==)</span></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ExceptT e m a -&gt; ExceptT e m a -&gt; Bool
forall (f :: * -&gt; *) a. (Eq1 f, Eq a) =&gt; f a -&gt; f a -&gt; Bool
</span><a href="../../base/src/Data.Functor.Classes.html#eq1"><span class="hs-identifier hs-var">eq1</span></a></span></span></span></span><span>
</span><span id="line-146"></span><span id="local-6989586621679075123"><span id="local-6989586621679075124"><span id="local-6989586621679075125"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074651"><span id="local-6989586621679074653"><span id="local-6989586621679074655"><span id="local-6989586621679074657"><span id="local-6989586621679074659"><span id="local-6989586621679074661"><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621679075125"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075124"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621679075123"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075125"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075124"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075123"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span></span></span></span><span>
</span><span id="line-147"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679074647"><span class="annot"><span class="annottext">compare :: ExceptT e m a -&gt; ExceptT e m a -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ExceptT e m a -&gt; ExceptT e m a -&gt; Ordering
forall (f :: * -&gt; *) a. (Ord1 f, Ord a) =&gt; f a -&gt; f a -&gt; Ordering
</span><a href="../../base/src/Data.Functor.Classes.html#compare1"><span class="hs-identifier hs-var">compare1</span></a></span></span></span></span><span>
</span><span id="line-148"></span><span id="local-6989586621679075117"><span id="local-6989586621679075118"><span id="local-6989586621679075119"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074638"><span id="local-6989586621679074640"><span id="local-6989586621679074642"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075119"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075118"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075117"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075119"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075118"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075117"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-149"></span><span>    </span><span id="local-6989586621679074634"><span class="annot"><span class="annottext">readsPrec :: Int -&gt; ReadS (ExceptT e m a)
</span><a href="../../base/src/GHC.Read.html#readsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">readsPrec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS (ExceptT e m a)
forall (f :: * -&gt; *) a. (Read1 f, Read a) =&gt; Int -&gt; ReadS (f a)
</span><a href="../../base/src/Data.Functor.Classes.html#readsPrec1"><span class="hs-identifier hs-var">readsPrec1</span></a></span></span></span></span><span>
</span><span id="line-150"></span><span id="local-6989586621679075111"><span id="local-6989586621679075112"><span id="local-6989586621679075113"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074627"><span id="local-6989586621679074629"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075113"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075112"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075111"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075113"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075112"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075111"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-151"></span><span>    </span><span id="local-6989586621679074623"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; ExceptT e m a -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ExceptT e m a -&gt; ShowS
forall (f :: * -&gt; *) a. (Show1 f, Show a) =&gt; Int -&gt; f a -&gt; ShowS
</span><a href="../../base/src/Data.Functor.Classes.html#showsPrec1"><span class="hs-identifier hs-var">showsPrec1</span></a></span></span></span></span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span class="hs-comment">-- | The inverse of 'ExceptT'.</span><span>
</span><span id="line-154"></span><span id="local-6989586621679075106"><span id="local-6989586621679075107"><span id="local-6989586621679075108"><span class="annot"><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-type">runExceptT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075108"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075107"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075106"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679075107"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075108"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075106"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-155"></span><span id="runExceptT"><span class="annot"><span class="annottext">runExceptT :: forall e (m :: * -&gt; *) a. ExceptT e m a -&gt; m (Either e a)
</span><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-var hs-var">runExceptT</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074620"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074620"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074620"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-156"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-pragma hs-type">runExceptT</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="hs-comment">-- | Map the unwrapped computation using the given function.</span><span>
</span><span id="line-159"></span><span class="hs-comment">--</span><span>
</span><span id="line-160"></span><span class="hs-comment">-- * @'runExceptT' ('mapExceptT' f m) = f ('runExceptT' m)@</span><span>
</span><span id="line-161"></span><span id="local-6989586621679075193"><span id="local-6989586621679075194"><span id="local-6989586621679075195"><span id="local-6989586621679075196"><span id="local-6989586621679075197"><span id="local-6989586621679075198"><span class="annot"><a href="Control.Monad.Trans.Except.html#mapExceptT"><span class="hs-identifier hs-type">mapExceptT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679075198"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075197"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075196"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679075195"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075194"><span class="hs-identifier hs-type">e'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075193"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-162"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075197"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075198"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075196"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-163"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075194"><span class="hs-identifier hs-type">e'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075195"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075193"><span class="hs-identifier hs-type">b</span></a></span></span></span></span></span></span></span><span>
</span><span id="line-164"></span><span id="mapExceptT"><span class="annot"><span class="annottext">mapExceptT :: forall (m :: * -&gt; *) e a (n :: * -&gt; *) e' b.
(m (Either e a) -&gt; n (Either e' b))
-&gt; ExceptT e m a -&gt; ExceptT e' n b
</span><a href="Control.Monad.Trans.Except.html#mapExceptT"><span class="hs-identifier hs-var hs-var">mapExceptT</span></a></span></span><span> </span><span id="local-6989586621679074619"><span class="annot"><span class="annottext">m (Either e a) -&gt; n (Either e' b)
</span><a href="#local-6989586621679074619"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679074618"><span class="annot"><span class="annottext">ExceptT e m a
</span><a href="#local-6989586621679074618"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">n (Either e' b) -&gt; ExceptT e' n b
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(n (Either e' b) -&gt; ExceptT e' n b)
-&gt; n (Either e' b) -&gt; ExceptT e' n b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; n (Either e' b)
</span><a href="#local-6989586621679074619"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExceptT e m a -&gt; m (Either e a)
forall e (m :: * -&gt; *) a. ExceptT e m a -&gt; m (Either e a)
</span><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-var">runExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">ExceptT e m a
</span><a href="#local-6989586621679074618"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#mapExceptT"><span class="hs-pragma hs-type">mapExceptT</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span class="hs-comment">-- | Transform any exceptions thrown by the computation using the</span><span>
</span><span id="line-168"></span><span class="hs-comment">-- given function.</span><span>
</span><span id="line-169"></span><span id="local-6989586621679075179"><span id="local-6989586621679075180"><span id="local-6989586621679075181"><span id="local-6989586621679075182"><span class="annot"><a href="Control.Monad.Trans.Except.html#withExceptT"><span class="hs-identifier hs-type">withExceptT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075182"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679075181"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679075180"><span class="hs-identifier hs-type">e'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075181"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075182"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075179"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075180"><span class="hs-identifier hs-type">e'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075182"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075179"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span><span>
</span><span id="line-170"></span><span id="withExceptT"><span class="annot"><span class="annottext">withExceptT :: forall (m :: * -&gt; *) e e' a.
Functor m =&gt;
(e -&gt; e') -&gt; ExceptT e m a -&gt; ExceptT e' m a
</span><a href="Control.Monad.Trans.Except.html#withExceptT"><span class="hs-identifier hs-var hs-var">withExceptT</span></a></span></span><span> </span><span id="local-6989586621679074615"><span class="annot"><span class="annottext">e -&gt; e'
</span><a href="#local-6989586621679074615"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; m (Either e' a))
-&gt; ExceptT e m a -&gt; ExceptT e' m a
forall (m :: * -&gt; *) e a (n :: * -&gt; *) e' b.
(m (Either e a) -&gt; n (Either e' b))
-&gt; ExceptT e m a -&gt; ExceptT e' n b
</span><a href="Control.Monad.Trans.Except.html#mapExceptT"><span class="hs-identifier hs-var">mapExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">((m (Either e a) -&gt; m (Either e' a))
 -&gt; ExceptT e m a -&gt; ExceptT e' m a)
-&gt; (m (Either e a) -&gt; m (Either e' a))
-&gt; ExceptT e m a
-&gt; ExceptT e' m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Either e a -&gt; Either e' a) -&gt; m (Either e a) -&gt; m (Either e' a)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">((Either e a -&gt; Either e' a) -&gt; m (Either e a) -&gt; m (Either e' a))
-&gt; (Either e a -&gt; Either e' a) -&gt; m (Either e a) -&gt; m (Either e' a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(e -&gt; Either e' a)
-&gt; (a -&gt; Either e' a) -&gt; Either e a -&gt; Either e' a
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e' -&gt; Either e' a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">(e' -&gt; Either e' a) -&gt; (e -&gt; e') -&gt; e -&gt; Either e' a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">e -&gt; e'
</span><a href="#local-6989586621679074615"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; Either e' a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span>
</span><span id="line-171"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#withExceptT"><span class="hs-pragma hs-type">withExceptT</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span id="local-6989586621679075081"><span id="local-6989586621679075082"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074611"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075082"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075081"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075082"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-174"></span><span>    </span><span id="local-6989586621679074606"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; ExceptT e m a -&gt; ExceptT e m b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679074605"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679074605"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e b) -&gt; ExceptT e m b
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e b) -&gt; ExceptT e m b)
-&gt; (ExceptT e m a -&gt; m (Either e b))
-&gt; ExceptT e m a
-&gt; ExceptT e m b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Either e a -&gt; Either e b) -&gt; m (Either e a) -&gt; m (Either e b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; Either e a -&gt; Either e b
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679074605"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; m (Either e b))
-&gt; (ExceptT e m a -&gt; m (Either e a))
-&gt; ExceptT e m a
-&gt; m (Either e b)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ExceptT e m a -&gt; m (Either e a)
forall e (m :: * -&gt; *) a. ExceptT e m a -&gt; m (Either e a)
</span><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-var">runExceptT</span></a></span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-pragma hs-type">fmap</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span id="local-6989586621679075061"><span id="local-6989586621679075062"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074572"><span id="local-6989586621679074574"><span id="local-6989586621679074576"><span id="local-6989586621679074578"><span id="local-6989586621679074580"><span id="local-6989586621679074582"><span id="local-6989586621679074584"><span id="local-6989586621679074586"><span id="local-6989586621679074588"><span id="local-6989586621679074590"><span id="local-6989586621679074592"><span id="local-6989586621679074594"><span id="local-6989586621679074596"><span id="local-6989586621679074598"><span id="local-6989586621679074600"><span id="local-6989586621679074603"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075062"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075061"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075062"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-178"></span><span>    </span><span id="local-6989586621679074566"><span class="annot"><span class="annottext">foldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; ExceptT e f a -&gt; m
</span><a href="#local-6989586621679074566"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldMap</span></a></span></span><span> </span><span id="local-6989586621679074565"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679074565"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074564"><span class="annot"><span class="annottext">f (Either e a)
</span><a href="#local-6989586621679074564"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Either e a -&gt; m) -&gt; f (Either e a) -&gt; m
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(e -&gt; m) -&gt; (a -&gt; m) -&gt; Either e a -&gt; m
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m -&gt; e -&gt; m
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">m
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679074565"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f (Either e a)
</span><a href="#local-6989586621679074564"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-179"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-pragma hs-type">foldMap</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span id="local-6989586621679075043"><span id="local-6989586621679075044"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074552"><span id="local-6989586621679074554"><span id="local-6989586621679074556"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075044"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075043"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075044"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-182"></span><span>    </span><span id="local-6989586621679074543"><span class="annot"><span class="annottext">traverse :: forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; ExceptT e f a -&gt; f (ExceptT e f b)
</span><a href="#local-6989586621679074543"><span class="hs-identifier hs-var hs-var hs-var hs-var">traverse</span></a></span></span><span> </span><span id="local-6989586621679074542"><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679074542"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074541"><span class="annot"><span class="annottext">f (Either e a)
</span><a href="#local-6989586621679074541"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-183"></span><span>        </span><span class="annot"><span class="annottext">f (Either e b) -&gt; ExceptT e f b
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(f (Either e b) -&gt; ExceptT e f b)
-&gt; f (f (Either e b)) -&gt; f (ExceptT e f b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(Either e a -&gt; f (Either e b))
-&gt; f (Either e a) -&gt; f (f (Either e b))
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(e -&gt; f (Either e b))
-&gt; (a -&gt; f (Either e b)) -&gt; Either e a -&gt; f (Either e b)
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Either e b -&gt; f (Either e b)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Either e b -&gt; f (Either e b))
-&gt; (e -&gt; Either e b) -&gt; e -&gt; f (Either e b)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">e -&gt; Either e b
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; Either e b) -&gt; f b -&gt; f (Either e b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; Either e b
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">(f b -&gt; f (Either e b)) -&gt; (a -&gt; f b) -&gt; a -&gt; f (Either e b)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679074542"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f (Either e a)
</span><a href="#local-6989586621679074541"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-184"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-pragma hs-type">traverse</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-185"></span><span>
</span><span id="line-186"></span><span id="local-6989586621679075024"><span id="local-6989586621679075025"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074531"><span id="local-6989586621679074534"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075025"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075025"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075024"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075025"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-187"></span><span>    </span><span id="local-6989586621679074528"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; ExceptT e m a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679074527"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074527"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; ExceptT e m a)
-&gt; m (Either e a) -&gt; ExceptT e m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Either e a -&gt; m (Either e a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either e a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074527"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-188"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#pure"><span class="hs-pragma hs-type">pure</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-189"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074521"><span class="annot"><span class="annottext">m (Either e (a -&gt; b))
</span><a href="#local-6989586621679074521"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679074520"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. ExceptT e m (a -&gt; b) -&gt; ExceptT e m a -&gt; ExceptT e m b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;*&gt;</span></a></span></span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074519"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074519"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e b) -&gt; ExceptT e m b
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e b) -&gt; ExceptT e m b)
-&gt; m (Either e b) -&gt; ExceptT e m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-190"></span><span>        </span><span id="local-6989586621679074518"><span class="annot"><span class="annottext">Either e (a -&gt; b)
</span><a href="#local-6989586621679074518"><span class="hs-identifier hs-var">mf</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m (Either e (a -&gt; b))
</span><a href="#local-6989586621679074521"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-191"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either e (a -&gt; b)
</span><a href="#local-6989586621679074518"><span class="hs-identifier hs-var">mf</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-192"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679074517"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074517"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either e b -&gt; m (Either e b)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; Either e b
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074517"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-193"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679074516"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679074516"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-194"></span><span>                </span><span id="local-6989586621679074515"><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074515"><span class="hs-identifier hs-var">mv</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074519"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-195"></span><span>                </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074515"><span class="hs-identifier hs-var">mv</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-196"></span><span>                    </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679074514"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074514"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either e b -&gt; m (Either e b)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; Either e b
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074514"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-197"></span><span>                    </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679074513"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074513"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either e b -&gt; m (Either e b)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b -&gt; Either e b
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679074516"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074513"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-198"></span><span>    </span><span class="hs-pragma">{-# INLINEABLE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&lt;*&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-199"></span><span>    </span><span id="local-6989586621679074511"><span class="annot"><span class="annottext">ExceptT e m a
</span><a href="#local-6989586621679074511"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679074510"><span class="annot"><span class="annottext">*&gt; :: forall a b. ExceptT e m a -&gt; ExceptT e m b -&gt; ExceptT e m b
</span><a href="../../base/src/GHC.Base.html#%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">*&gt;</span></a></span></span><span> </span><span id="local-6989586621679074509"><span class="annot"><span class="annottext">ExceptT e m b
</span><a href="#local-6989586621679074509"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ExceptT e m a
</span><a href="#local-6989586621679074511"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">ExceptT e m a -&gt; (a -&gt; ExceptT e m b) -&gt; ExceptT e m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ExceptT e m b
</span><a href="#local-6989586621679074509"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-200"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">*&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span id="local-6989586621679075009"><span id="local-6989586621679075010"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074501"><span id="local-6989586621679074503"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075010"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075010"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075009"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075009"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075010"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-203"></span><span>    </span><span id="local-6989586621679074497"><span class="annot"><span class="annottext">empty :: forall a. ExceptT e m a
</span><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier hs-var hs-var hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; ExceptT e m a)
-&gt; m (Either e a) -&gt; ExceptT e m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Either e a -&gt; m (Either e a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; Either e a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">e
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-204"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#empty"><span class="hs-pragma hs-type">empty</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-205"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074491"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074491"><span class="hs-identifier hs-var">mx</span></a></span></span><span> </span><span id="local-6989586621679074490"><span class="annot"><span class="annottext">&lt;|&gt; :: forall a. ExceptT e m a -&gt; ExceptT e m a -&gt; ExceptT e m a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;|&gt;</span></a></span></span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074488"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074488"><span class="hs-identifier hs-var">my</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; ExceptT e m a)
-&gt; m (Either e a) -&gt; ExceptT e m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-206"></span><span>        </span><span id="local-6989586621679074487"><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074487"><span class="hs-identifier hs-var">ex</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074491"><span class="hs-identifier hs-var">mx</span></a></span><span>
</span><span id="line-207"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074487"><span class="hs-identifier hs-var">ex</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-208"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679074486"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074486"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Either e a -&gt; Either e a) -&gt; m (Either e a) -&gt; m (Either e a)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(e -&gt; Either e a) -&gt; (a -&gt; Either e a) -&gt; Either e a -&gt; Either e a
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; Either e a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">(e -&gt; Either e a) -&gt; (e -&gt; e) -&gt; e -&gt; Either e a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">e -&gt; e -&gt; e
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var">mappend</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074486"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; Either e a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074488"><span class="hs-identifier hs-var">my</span></a></span><span>
</span><span id="line-209"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679074484"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074484"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either e a -&gt; m (Either e a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either e a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074484"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-210"></span><span>    </span><span class="hs-pragma">{-# INLINEABLE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&lt;|&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span id="local-6989586621679075019"><span id="local-6989586621679075020"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074477"><span id="local-6989586621679074479"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075020"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075019"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679075020"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">
#if !(MIN_VERSION_base(4,8,0))
</span><span>    </span><span class="hs-identifier">return</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ExceptT</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">return</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">Right</span><span> </span><span class="hs-identifier">a</span><span class="hs-special">)</span><span>
</span><span id="line-215"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">return</span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#endif
</span><span>    </span><span id="local-6989586621679074473"><span class="annot"><span class="annottext">ExceptT e m a
</span><a href="#local-6989586621679074473"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679074472"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. ExceptT e m a -&gt; (a -&gt; ExceptT e m b) -&gt; ExceptT e m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621679074471"><span class="annot"><span class="annottext">a -&gt; ExceptT e m b
</span><a href="#local-6989586621679074471"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e b) -&gt; ExceptT e m b
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e b) -&gt; ExceptT e m b)
-&gt; m (Either e b) -&gt; ExceptT e m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-218"></span><span>        </span><span id="local-6989586621679074470"><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074470"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ExceptT e m a -&gt; m (Either e a)
forall e (m :: * -&gt; *) a. ExceptT e m a -&gt; m (Either e a)
</span><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-var">runExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">ExceptT e m a
</span><a href="#local-6989586621679074473"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-219"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074470"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-220"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679074469"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074469"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either e b -&gt; m (Either e b)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; Either e b
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074469"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-221"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679074468"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074468"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ExceptT e m b -&gt; m (Either e b)
forall e (m :: * -&gt; *) a. ExceptT e m a -&gt; m (Either e a)
</span><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-var">runExceptT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; ExceptT e m b
</span><a href="#local-6989586621679074471"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074468"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-222"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&gt;&gt;=</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span></span></span><span class="hs-cpp">
#if !(MIN_VERSION_base(4,13,0))
</span><span>    </span><span class="hs-identifier">fail</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ExceptT</span><span> </span><span class="hs-operator">.</span><span> </span><span class="hs-identifier">fail</span><span>
</span><span id="line-225"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">fail</span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span id="local-6989586621679074994"><span id="local-6989586621679074995"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">Fail.MonadFail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074995"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">Fail.MonadFail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074994"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074995"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-230"></span><span>    </span><span id="local-6989586621679074458"><span class="annot"><span class="annottext">fail :: forall a. String -&gt; ExceptT e m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var hs-var hs-var hs-var">fail</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; ExceptT e m a)
-&gt; (String -&gt; m (Either e a)) -&gt; String -&gt; ExceptT e m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; m (Either e a)
forall (m :: * -&gt; *) a. MonadFail m =&gt; String -&gt; m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var">Fail.fail</span></a></span><span>
</span><span id="line-231"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-pragma hs-type">fail</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-234"></span><span id="local-6989586621679074985"><span id="local-6989586621679074986"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074986"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074985"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#MonadPlus"><span class="hs-identifier hs-type">MonadPlus</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074985"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074986"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-235"></span><span>    </span><span id="local-6989586621679074443"><span class="annot"><span class="annottext">mzero :: forall a. ExceptT e m a
</span><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzero</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; ExceptT e m a)
-&gt; m (Either e a) -&gt; ExceptT e m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Either e a -&gt; m (Either e a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; Either e a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">e
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-236"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-pragma hs-type">mzero</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-237"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074437"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074437"><span class="hs-identifier hs-var">mx</span></a></span></span><span> </span><span id="local-6989586621679074436"><span class="annot"><span class="annottext">mplus :: forall a. ExceptT e m a -&gt; ExceptT e m a -&gt; ExceptT e m a
</span><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-operator hs-var hs-var hs-var hs-var">`mplus`</span></a></span></span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074434"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074434"><span class="hs-identifier hs-var">my</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; ExceptT e m a)
-&gt; m (Either e a) -&gt; ExceptT e m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-238"></span><span>        </span><span id="local-6989586621679074433"><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074433"><span class="hs-identifier hs-var">ex</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074437"><span class="hs-identifier hs-var">mx</span></a></span><span>
</span><span id="line-239"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074433"><span class="hs-identifier hs-var">ex</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-240"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679074432"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074432"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Either e a -&gt; Either e a) -&gt; m (Either e a) -&gt; m (Either e a)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(e -&gt; Either e a) -&gt; (a -&gt; Either e a) -&gt; Either e a -&gt; Either e a
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; Either e a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">(e -&gt; Either e a) -&gt; (e -&gt; e) -&gt; e -&gt; Either e a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">e -&gt; e -&gt; e
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var">mappend</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074432"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; Either e a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074434"><span class="hs-identifier hs-var">my</span></a></span><span>
</span><span id="line-241"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679074431"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074431"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either e a -&gt; m (Either e a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either e a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074431"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-242"></span><span>    </span><span class="hs-pragma">{-# INLINEABLE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-pragma hs-type">mplus</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span id="local-6989586621679074977"><span id="local-6989586621679074978"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074978"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074977"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074978"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-245"></span><span>    </span><span id="local-6989586621679074421"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; ExceptT e m a) -&gt; ExceptT e m a
</span><a href="../../base/src/Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679074420"><span class="annot"><span class="annottext">a -&gt; ExceptT e m a
</span><a href="#local-6989586621679074420"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Either e a -&gt; m (Either e a)) -&gt; m (Either e a)
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="../../base/src/Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExceptT e m a -&gt; m (Either e a)
forall e (m :: * -&gt; *) a. ExceptT e m a -&gt; m (Either e a)
</span><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-var">runExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(ExceptT e m a -&gt; m (Either e a))
-&gt; (Either e a -&gt; ExceptT e m a) -&gt; Either e a -&gt; m (Either e a)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; ExceptT e m a
</span><a href="#local-6989586621679074420"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; ExceptT e m a)
-&gt; (Either e a -&gt; a) -&gt; Either e a -&gt; ExceptT e m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(e -&gt; a) -&gt; (a -&gt; a) -&gt; Either e a -&gt; a
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; e -&gt; a
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">a
forall {a}. a
</span><a href="#local-6989586621679074419"><span class="hs-identifier hs-var">bomb</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-246"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679074419"><span class="annot"><span class="annottext">bomb :: a
</span><a href="#local-6989586621679074419"><span class="hs-identifier hs-var hs-var">bomb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mfix (ExceptT): inner computation returned Left value&quot;</span></span><span>
</span><span id="line-247"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#mfix"><span class="hs-pragma hs-type">mfix</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span id="local-6989586621679074965"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Class.html#MonadTrans"><span class="hs-identifier hs-type">MonadTrans</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074965"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-250"></span><span>    </span><span id="local-6989586621679074409"><span class="annot"><span class="annottext">lift :: forall (m :: * -&gt; *) a. Monad m =&gt; m a -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var hs-var hs-var hs-var">lift</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; ExceptT e m a)
-&gt; (m a -&gt; m (Either e a)) -&gt; m a -&gt; ExceptT e m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Either e a) -&gt; m a -&gt; m (Either e a)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Either e a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span>
</span><span id="line-251"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Class.html#lift"><span class="hs-pragma hs-type">lift</span></a></span><span> </span><span class="hs-pragma">#-}</span></span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span id="local-6989586621679074956"><span id="local-6989586621679074957"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074957"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074956"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074957"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-254"></span><span>    </span><span id="local-6989586621679074396"><span class="annot"><span class="annottext">liftIO :: forall a. IO a -&gt; ExceptT e m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftIO</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; ExceptT e m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; ExceptT e m a) -&gt; (IO a -&gt; m a) -&gt; IO a -&gt; ExceptT e m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IO a -&gt; m a
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span>
</span><span id="line-255"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-pragma hs-type">liftIO</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span class="hs-cpp">

#if MIN_VERSION_base(4,4,0)
</span><span id="local-6989586621679074945"><span id="local-6989586621679074946"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074388"><span id="local-6989586621679074391"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074946"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074945"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074946"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-259"></span><span>    </span><span id="local-6989586621679074383"><span class="annot"><span class="annottext">mzipWith :: forall a b c.
(a -&gt; b -&gt; c) -&gt; ExceptT e m a -&gt; ExceptT e m b -&gt; ExceptT e m c
</span><a href="#local-6989586621679074383"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span id="local-6989586621679074382"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679074382"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074381"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074381"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span id="local-6989586621679074380"><span class="annot"><span class="annottext">m (Either e b)
</span><a href="#local-6989586621679074380"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e c) -&gt; ExceptT e m c
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e c) -&gt; ExceptT e m c)
-&gt; m (Either e c) -&gt; ExceptT e m c
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Either e a -&gt; Either e b -&gt; Either e c)
-&gt; m (Either e a) -&gt; m (Either e b) -&gt; m (Either e c)
forall (m :: * -&gt; *) a b c.
MonadZip m =&gt;
(a -&gt; b -&gt; c) -&gt; m a -&gt; m b -&gt; m c
</span><a href="../../base/src/Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-var">mzipWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Either e a -&gt; Either e b -&gt; Either e c
forall (f :: * -&gt; *) a b c.
Applicative f =&gt;
(a -&gt; b -&gt; c) -&gt; f a -&gt; f b -&gt; f c
</span><a href="../../base/src/GHC.Base.html#liftA2"><span class="hs-identifier hs-var">liftA2</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679074382"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074381"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either e b)
</span><a href="#local-6989586621679074380"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-260"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Zip.html#mzipWith"><span class="hs-pragma hs-type">mzipWith</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">
#if MIN_VERSION_base(4,12,0)
</span><span id="local-6989586621679074934"><span id="local-6989586621679074935"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679074376"><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074935"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#Contravariant"><span class="hs-identifier hs-type">Contravariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074934"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074935"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-265"></span><span>    </span><span id="local-6989586621679074372"><span class="annot"><span class="annottext">contramap :: forall a' a. (a' -&gt; a) -&gt; ExceptT e m a -&gt; ExceptT e m a'
</span><a href="../../base/src/Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var hs-var hs-var hs-var">contramap</span></a></span></span><span> </span><span id="local-6989586621679074370"><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679074370"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a') -&gt; ExceptT e m a'
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e a') -&gt; ExceptT e m a')
-&gt; (ExceptT e m a -&gt; m (Either e a'))
-&gt; ExceptT e m a
-&gt; ExceptT e m a'
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Either e a' -&gt; Either e a) -&gt; m (Either e a) -&gt; m (Either e a')
forall (f :: * -&gt; *) a' a.
Contravariant f =&gt;
(a' -&gt; a) -&gt; f a -&gt; f a'
</span><a href="../../base/src/Data.Functor.Contravariant.html#contramap"><span class="hs-identifier hs-var">contramap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a' -&gt; a) -&gt; Either e a' -&gt; Either e a
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a' -&gt; a
</span><a href="#local-6989586621679074370"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; m (Either e a'))
-&gt; (ExceptT e m a -&gt; m (Either e a))
-&gt; ExceptT e m a
-&gt; m (Either e a')
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ExceptT e m a -&gt; m (Either e a)
forall e (m :: * -&gt; *) a. ExceptT e m a -&gt; m (Either e a)
</span><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-var">runExceptT</span></a></span><span>
</span><span id="line-266"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Contravariant.html#contramap"><span class="hs-pragma hs-type">contramap</span></a></span><span> </span><span class="hs-pragma">#-}</span></span></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-269"></span><span class="hs-comment">-- | Signal an exception value @e@.</span><span>
</span><span id="line-270"></span><span class="hs-comment">--</span><span>
</span><span id="line-271"></span><span class="hs-comment">-- * @'runExceptT' ('throwE' e) = 'return' ('Left' e)@</span><span>
</span><span id="line-272"></span><span class="hs-comment">--</span><span>
</span><span id="line-273"></span><span class="hs-comment">-- * @'throwE' e &gt;&gt;= m = 'throwE' e@</span><span>
</span><span id="line-274"></span><span id="local-6989586621679074929"><span id="local-6989586621679074930"><span id="local-6989586621679074931"><span class="annot"><a href="Control.Monad.Trans.Except.html#throwE"><span class="hs-identifier hs-type">throwE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074931"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679074930"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074930"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074931"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074929"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-275"></span><span id="throwE"><span class="annot"><span class="annottext">throwE :: forall (m :: * -&gt; *) e a. Monad m =&gt; e -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#throwE"><span class="hs-identifier hs-var hs-var">throwE</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; ExceptT e m a)
-&gt; (e -&gt; m (Either e a)) -&gt; e -&gt; ExceptT e m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Either e a -&gt; m (Either e a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Either e a -&gt; m (Either e a))
-&gt; (e -&gt; Either e a) -&gt; e -&gt; m (Either e a)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">e -&gt; Either e a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span>
</span><span id="line-276"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#throwE"><span class="hs-pragma hs-type">throwE</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-277"></span><span>
</span><span id="line-278"></span><span class="hs-comment">-- | Handle an exception.</span><span>
</span><span id="line-279"></span><span class="hs-comment">--</span><span>
</span><span id="line-280"></span><span class="hs-comment">-- * @'catchE' ('lift' m) h = 'lift' m@</span><span>
</span><span id="line-281"></span><span class="hs-comment">--</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- * @'catchE' ('throwE' e) h = h e@</span><span>
</span><span id="line-283"></span><span id="local-6989586621679074922"><span id="local-6989586621679074923"><span id="local-6989586621679074924"><span id="local-6989586621679074925"><span class="annot"><a href="Control.Monad.Trans.Except.html#catchE"><span class="hs-identifier hs-type">catchE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074925"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span>
</span><span id="line-284"></span><span>    </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074924"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074925"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074923"><span class="hs-identifier hs-type">a</span></a></span><span>               </span><span class="hs-comment">-- ^ the inner computation</span><span>
</span><span id="line-285"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679074924"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074922"><span class="hs-identifier hs-type">e'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074925"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074923"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-comment">-- ^ a handler for exceptions in the inner</span><span>
</span><span id="line-286"></span><span>                                </span><span class="hs-comment">-- computation</span><span>
</span><span id="line-287"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074922"><span class="hs-identifier hs-type">e'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074925"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074923"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span><span>
</span><span id="line-288"></span><span id="local-6989586621679074364"><span class="annot"><span class="annottext">ExceptT e m a
</span><a href="#local-6989586621679074364"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="catchE"><span class="annot"><span class="annottext">catchE :: forall (m :: * -&gt; *) e a e'.
Monad m =&gt;
ExceptT e m a -&gt; (e -&gt; ExceptT e' m a) -&gt; ExceptT e' m a
</span><a href="Control.Monad.Trans.Except.html#catchE"><span class="hs-operator hs-var hs-var">`catchE`</span></a></span></span><span> </span><span id="local-6989586621679074363"><span class="annot"><span class="annottext">e -&gt; ExceptT e' m a
</span><a href="#local-6989586621679074363"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e' a) -&gt; ExceptT e' m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e' a) -&gt; ExceptT e' m a)
-&gt; m (Either e' a) -&gt; ExceptT e' m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-289"></span><span>    </span><span id="local-6989586621679074362"><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074362"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ExceptT e m a -&gt; m (Either e a)
forall e (m :: * -&gt; *) a. ExceptT e m a -&gt; m (Either e a)
</span><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-var">runExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">ExceptT e m a
</span><a href="#local-6989586621679074364"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-290"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074362"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-291"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span>  </span><span id="local-6989586621679074361"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074361"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ExceptT e' m a -&gt; m (Either e' a)
forall e (m :: * -&gt; *) a. ExceptT e m a -&gt; m (Either e a)
</span><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-var">runExceptT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; ExceptT e' m a
</span><a href="#local-6989586621679074363"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074361"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-292"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679074360"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074360"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either e' a -&gt; m (Either e' a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either e' a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074360"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-293"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#catchE"><span class="hs-pragma hs-type">catchE</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span class="hs-comment">-- | Lift a @callCC@ operation to the new monad.</span><span>
</span><span id="line-296"></span><span id="local-6989586621679074914"><span id="local-6989586621679074915"><span id="local-6989586621679074916"><span id="local-6989586621679074917"><span class="annot"><a href="Control.Monad.Trans.Except.html#liftCallCC"><span class="hs-identifier hs-type">liftCallCC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html#CallCC"><span class="hs-identifier hs-type">CallCC</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074917"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074916"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074915"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074916"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074914"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html#CallCC"><span class="hs-identifier hs-type">CallCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074916"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074917"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679074915"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074914"><span class="hs-identifier hs-type">b</span></a></span></span></span></span></span><span>
</span><span id="line-297"></span><span id="liftCallCC"><span class="annot"><span class="annottext">liftCallCC :: forall (m :: * -&gt; *) e a b.
CallCC m (Either e a) (Either e b) -&gt; CallCC (ExceptT e m) a b
</span><a href="Control.Monad.Trans.Except.html#liftCallCC"><span class="hs-identifier hs-var hs-var">liftCallCC</span></a></span></span><span> </span><span id="local-6989586621679074359"><span class="annot"><span class="annottext">CallCC m (Either e a) (Either e b)
</span><a href="#local-6989586621679074359"><span class="hs-identifier hs-var">callCC</span></a></span></span><span> </span><span id="local-6989586621679074358"><span class="annot"><span class="annottext">(a -&gt; ExceptT e m b) -&gt; ExceptT e m a
</span><a href="#local-6989586621679074358"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either e a) -&gt; ExceptT e m a
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; ExceptT e m a)
-&gt; m (Either e a) -&gt; ExceptT e m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-298"></span><span>    </span><span class="annot"><span class="annottext">CallCC m (Either e a) (Either e b)
</span><a href="#local-6989586621679074359"><span class="hs-identifier hs-var">callCC</span></a></span><span> </span><span class="annot"><span class="annottext">CallCC m (Either e a) (Either e b)
-&gt; CallCC m (Either e a) (Either e b)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679074357"><span class="annot"><span class="annottext">Either e a -&gt; m (Either e b)
</span><a href="#local-6989586621679074357"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-299"></span><span>    </span><span class="annot"><span class="annottext">ExceptT e m a -&gt; m (Either e a)
forall e (m :: * -&gt; *) a. ExceptT e m a -&gt; m (Either e a)
</span><a href="Control.Monad.Trans.Except.html#runExceptT"><span class="hs-identifier hs-var">runExceptT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; ExceptT e m b) -&gt; ExceptT e m a
</span><a href="#local-6989586621679074358"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679074356"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074356"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">m (Either e b) -&gt; ExceptT e m b
forall e (m :: * -&gt; *) a. m (Either e a) -&gt; ExceptT e m a
</span><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-var">ExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either e b) -&gt; ExceptT e m b)
-&gt; m (Either e b) -&gt; ExceptT e m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Either e a -&gt; m (Either e b)
</span><a href="#local-6989586621679074357"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either e a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074356"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-300"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#liftCallCC"><span class="hs-pragma hs-type">liftCallCC</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span class="hs-comment">-- | Lift a @listen@ operation to the new monad.</span><span>
</span><span id="line-303"></span><span id="local-6989586621679074905"><span id="local-6989586621679074906"><span id="local-6989586621679074907"><span id="local-6989586621679074908"><span class="annot"><a href="Control.Monad.Trans.Except.html#liftListen"><span class="hs-identifier hs-type">liftListen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074908"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html#Listen"><span class="hs-identifier hs-type">Listen</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074907"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074908"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074906"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074905"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html#Listen"><span class="hs-identifier hs-type">Listen</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074907"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074906"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074908"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679074905"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span><span>
</span><span id="line-304"></span><span id="liftListen"><span class="annot"><span class="annottext">liftListen :: forall (m :: * -&gt; *) w e a.
Monad m =&gt;
Listen w m (Either e a) -&gt; Listen w (ExceptT e m) a
</span><a href="Control.Monad.Trans.Except.html#liftListen"><span class="hs-identifier hs-var hs-var">liftListen</span></a></span></span><span> </span><span id="local-6989586621679074351"><span class="annot"><span class="annottext">Listen w m (Either e a)
</span><a href="#local-6989586621679074351"><span class="hs-identifier hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m (Either e a) -&gt; m (Either e (a, w)))
-&gt; ExceptT e m a -&gt; ExceptT e m (a, w)
forall (m :: * -&gt; *) e a (n :: * -&gt; *) e' b.
(m (Either e a) -&gt; n (Either e' b))
-&gt; ExceptT e m a -&gt; ExceptT e' n b
</span><a href="Control.Monad.Trans.Except.html#mapExceptT"><span class="hs-identifier hs-var">mapExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">((m (Either e a) -&gt; m (Either e (a, w)))
 -&gt; ExceptT e m a -&gt; ExceptT e m (a, w))
-&gt; (m (Either e a) -&gt; m (Either e (a, w)))
-&gt; ExceptT e m a
-&gt; ExceptT e m (a, w)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679074350"><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074350"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-305"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679074349"><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074349"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679074348"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679074348"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Listen w m (Either e a)
</span><a href="#local-6989586621679074351"><span class="hs-identifier hs-var">listen</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either e a)
</span><a href="#local-6989586621679074350"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-306"></span><span>    </span><span class="annot"><span class="annottext">Either e (a, w) -&gt; m (Either e (a, w))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Either e (a, w) -&gt; m (Either e (a, w)))
-&gt; Either e (a, w) -&gt; m (Either e (a, w))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; (a, w)) -&gt; Either e a -&gt; Either e (a, w)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679074346"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074346"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074346"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679074348"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679074349"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-307"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#liftListen"><span class="hs-pragma hs-type">liftListen</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span class="hs-comment">-- | Lift a @pass@ operation to the new monad.</span><span>
</span><span id="line-310"></span><span id="local-6989586621679074896"><span id="local-6989586621679074897"><span id="local-6989586621679074898"><span id="local-6989586621679074899"><span class="annot"><a href="Control.Monad.Trans.Except.html#liftPass"><span class="hs-identifier hs-type">liftPass</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074899"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html#Pass"><span class="hs-identifier hs-type">Pass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074898"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074899"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074897"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074896"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Signatures.html#Pass"><span class="hs-identifier hs-type">Pass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074898"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074897"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679074899"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679074896"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span><span>
</span><span id="line-311"></span><span id="liftPass"><span class="annot"><span class="annottext">liftPass :: forall (m :: * -&gt; *) w e a.
Monad m =&gt;
Pass w m (Either e a) -&gt; Pass w (ExceptT e m) a
</span><a href="Control.Monad.Trans.Except.html#liftPass"><span class="hs-identifier hs-var hs-var">liftPass</span></a></span></span><span> </span><span id="local-6989586621679074342"><span class="annot"><span class="annottext">Pass w m (Either e a)
</span><a href="#local-6989586621679074342"><span class="hs-identifier hs-var">pass</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m (Either e (a, w -&gt; w)) -&gt; m (Either e a))
-&gt; ExceptT e m (a, w -&gt; w) -&gt; ExceptT e m a
forall (m :: * -&gt; *) e a (n :: * -&gt; *) e' b.
(m (Either e a) -&gt; n (Either e' b))
-&gt; ExceptT e m a -&gt; ExceptT e' n b
</span><a href="Control.Monad.Trans.Except.html#mapExceptT"><span class="hs-identifier hs-var">mapExceptT</span></a></span><span> </span><span class="annot"><span class="annottext">((m (Either e (a, w -&gt; w)) -&gt; m (Either e a))
 -&gt; ExceptT e m (a, w -&gt; w) -&gt; ExceptT e m a)
-&gt; (m (Either e (a, w -&gt; w)) -&gt; m (Either e a))
-&gt; ExceptT e m (a, w -&gt; w)
-&gt; ExceptT e m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679074341"><span class="annot"><span class="annottext">m (Either e (a, w -&gt; w))
</span><a href="#local-6989586621679074341"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Pass w m (Either e a)
</span><a href="#local-6989586621679074342"><span class="hs-identifier hs-var">pass</span></a></span><span> </span><span class="annot"><span class="annottext">Pass w m (Either e a) -&gt; Pass w m (Either e a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-312"></span><span>    </span><span id="local-6989586621679074340"><span class="annot"><span class="annottext">Either e (a, w -&gt; w)
</span><a href="#local-6989586621679074340"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m (Either e (a, w -&gt; w))
</span><a href="#local-6989586621679074341"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-313"></span><span>    </span><span class="annot"><span class="annottext">(Either e a, w -&gt; w) -&gt; m (Either e a, w -&gt; w)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">((Either e a, w -&gt; w) -&gt; m (Either e a, w -&gt; w))
-&gt; (Either e a, w -&gt; w) -&gt; m (Either e a, w -&gt; w)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either e (a, w -&gt; w)
</span><a href="#local-6989586621679074340"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-314"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679074339"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074339"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; Either e a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679074339"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w -&gt; w
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-315"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679074338"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074338"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679074337"><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679074337"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either e a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679074338"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679074337"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-316"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Control.Monad.Trans.Except.html#liftPass"><span class="hs-pragma hs-type">liftPass</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-317"></span></pre></body></html>